package LiKou;

import java.util.Arrays;

public class ProblemLCR172 {
    public static void main(String[] args) {

    }
    public static int countTarget(int[] scores, int target) {
        int i = Arrays.binarySearch(scores, target);
        int count=1;
        int right=i+1;
        while(i>=0){
            if(scores[i]!=target){
                break;
            }
            count++;
            i--;
        }
        while (right<scores.length){
            if(scores[right]!=target){
                break;
            }
            count++;
            right++;
        }
        return count;
    }
}
